package cn.mall.org.mapper;

import cn.mall.org.domain.Shop;
import cn.mall.base.mapper.BaseMapper;
import cn.mall.org.query.ShopQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author myf
 * @since 2023-12-02
 */
public interface ShopMapper extends BaseMapper<Shop> {

    Shop loadByName(String name);

    void updateByState(@Param("id") Long id, @Param("state") int state);

    List<Shop> getShopsByUserId(Long id);

    Long loadTotalById(@Param("query") ShopQuery query, @Param("id") Long id);

    List<Shop> pageListById(@Param("query") ShopQuery query, @Param("id") Long id);
}
